package com.trmp.sys.orgMng.dao;


import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.trmp.sys.orgMng.entity.DepartInfo;

public interface DepartInfoDao extends JpaRepository<DepartInfo, Long>{
	@Query(value="select * from T_SYS_DEPARTMENT t where t.ORGID=?1",nativeQuery=true)
	public List<DepartInfo> findAllByOrgID(String oragationid);
	
	
	@Query(value=" from DepartInfo a join fetch a.organInfo b where a.departId = ?1")
	public DepartInfo findByDepartId(long id);
	
	
}
